export default {
	state: {
		user: "", // 用户信息
		showLogin: false // 登录表单是否显示
	},
	getters: {
		getUser (state) {
		  return state.user
		},
		getShowLogin (state) {
		  return state.showLogin
		}
	},
	mutations: {
		setUser (state, data) {
		  state.user = data;
		},
		setShowLogin (state, data) {
		  state.showLogin = data;
		}
	},
	actions:{
		setUser ( { commit }, data) {
		  commit('setUser', data);
		},
		setShowLogin ( { commit }, data) {
		  commit('setShowLogin', data);
		}
	}
}